package cn.topevery.garden.entity.po;

import cn.topevery.garden.framework.base.BaseEntity;
import com.alibaba.fastjson.annotation.JSONField;
import hw.topevery.framework.annotation.DbTable;
import hw.topevery.framework.annotation.DbTableField;
import hw.topevery.framework.enums.DbTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 现场检查
 */
@Data
@DbTable(tableName = "t_task_on_site")
public class TaskOnSite extends BaseEntity {
    /**
     * 标段ID
     */
    @DbTableField(columnName = "c_section_id", dbType = DbTypeEnum.INTEGER)
    public Integer sectionId;

    /**
     * 标段名字
     */
    @DbTableField(columnName = "c_section_name", dbType = DbTypeEnum.VARCHAR)
    public String sectionName;

    /**
     * 企业ID
     */
    @DbTableField(columnName = "c_company_id", dbType = DbTypeEnum.INTEGER)
    public Integer companyId;

    /**
     * 企业名字
     */
    @DbTableField(columnName = "c_company_name", dbType = DbTypeEnum.VARCHAR)
    public String companyName;

    /**
     * 考评时间
     */
    @DbTableField(columnName = "c_evaluation_time", dbType = DbTypeEnum.TIMESTAMP)
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    public LocalDateTime evaluationTime;

    /**
     * 考评扣分
     */
    @DbTableField(columnName = "c_score", dbType = DbTypeEnum.INTEGER)
    public Integer score = 0;

    /**
     * 检查时间
     */
    @DbTableField(columnName = "c_check_time", dbType = DbTypeEnum.TIMESTAMP)
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    public LocalDateTime checkTime;

    /**
     * 考评内容
     */
    @DbTableField(columnName = "c_evaluation_content", dbType = DbTypeEnum.VARCHAR)
    public String evaluationContent;

    @ApiModelProperty(value = "考评人名字")
    @DbTableField(columnName = "c_evaluation_user_id", dbType = DbTypeEnum.VARCHAR)
    private Integer evaluationUserId;

    @ApiModelProperty(value = "考评人名字")
    @DbTableField(columnName = "c_evaluation_user_name", dbType = DbTypeEnum.VARCHAR)
    private String evaluationUserName;

    /**
     * 是否填报
     */
    @DbTableField(columnName = "c_finished", dbType = DbTypeEnum.VARCHAR)
    public Boolean finished = false;

}
